﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StyleMVVM.DependencyInjection
{
	/// <summary>
	/// When IDependencyInjectionContainerConfiguration is searching an assembly for exports
	/// it first tries to export the class, it then will call all registered Factories 
	/// to see if others wish to export it.
	/// Note: IExportStrategyFactory classes can not be exported they must be registered with the container manually
	/// </summary>
	public interface IExportStrategyFactory
	{
		/// <summary>
		/// Create an activation strategy for the provided type
		/// </summary>
		/// <param name="container">IDepencyInjectionContainer this factory is to be used in.
		/// Note: when this method is called there will be no exports available. </param>
		/// <param name="type">type to create the strategy for</param>
		/// <param name="attributes">attributes on the class</param>
		/// <param name="alreadyExported"></param>
		/// <returns>activation strategy for the type if there is one.</returns>
		IExportStrategy CreateStrategy(IDependencyInjectionContainer container,
		                               Type type,
		                               IEnumerable<object> attributes,
		                               bool alreadyExported);
	}
}